import Vue from 'vue'
import App from './App'
import router from '@/router'
import api from './http'
import i18n from './i18n'
import store from './store'
import global from '@/utils/global'
import ElementUI from 'element-ui'
import Router from 'vue-router'
import echarts from 'echarts' // 引入echarts
import 'element-ui/lib/theme-chalk/index.css'
import 'font-awesome/css/font-awesome.min.css'
import '@/assets/style/index.css'
import 'babel-polyfill'
import promise from 'es6-promise'
promise.polyfill()
import '@/icons'
// 富文本
import VueQuillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'

Vue.use(VueQuillEditor)

Vue.use(ElementUI)
Vue.use(api)
Vue.prototype.global = global
Vue.prototype.$echarts = echarts
const routerPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return routerPush.call(this, location).catch(error=> error)
}
new Vue({
  el: '#app',
  i18n,
  router,
  store,
  render: h => h(App)
});
